/*
 * Project: BoboDesignPattern
 * 
 * File Created at 2019年2月18日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package memento;

/**
 * @Type Emp
 * @Desc 源发戚类
 * @author 52489
 * @date 2019年2月18日
 * @Version V1.0
 */
public class Emp {
    private String name;
    private String age;
    private double salary;

    public EmpMemento memento() {
        return new EmpMemento(this);
    }

    /**
     * @param name
     * @param age
     * @param salary
     */
    public Emp(String name, String age, double salary) {
        super();
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    public void recovery(EmpMemento emp) {
        this.name = emp.getName();
        this.age = emp.getAge();
        this.salary = emp.getSalary();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

}
